package com.xiaoxin.yixinai.activity.introduction;

import java.util.List;

import javax.annotation.Resource;
import javax.persistence.EntityManager;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xiaoxin.yixinai._frame.base.BaseRepository;
import com.xiaoxin.yixinai._frame.base.BaseServiceProxy;

@Service
@Transactional
public class IntroductionService extends BaseServiceProxy<Introduction> {
	
	@Resource
    private EntityManager em;
	
	@Resource
	private IntroductionRepository introductionRepository;

	@Override
	protected BaseRepository<Introduction> getBaseRepository() {
		return introductionRepository;
	}
	
	/**
	 * 查询活动内容
	 */
	List<Introduction> findByActivityId(Integer activityId){
		return introductionRepository.findByActivityIdOrderByOrderIndexAsc(activityId);
	}
	
	
}
